package lgq.xuan.httprequest;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

import lgq.xuan.httprequest.param.BaseMsg;
import lgq.xuan.httprequest.util.sqlite.PhoneCURD;

public class LocationAddActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_loaction_add);
    }

    public void phoneSubmit(View view) {

        EditText phoneNameEdit = findViewById(R.id.phone_name);
        EditText phoneCalledEdit = findViewById(R.id.phone_called);
        EditText phonePhoneEdit = findViewById(R.id.phone_phone);

        String name = phoneNameEdit.getText().toString();
        String called = phoneCalledEdit.getText().toString();
        String phone = phonePhoneEdit.getText().toString();

        PhoneCURD.insert(this, BaseMsg.UID, name, called, phone);

        onBackPressed();

    }
}